package com.cooper.beautyseesee.data;

import android.os.Parcel;
import android.os.Parcelable;
import android.util.SparseArray;

public class BeautySource implements Parcelable{
	
	public BeautySource(int scraperId){
		super();
		this.scrapeId = scraperId;
	}
	
	private int scrapeId;
	
	private SparseArray<Object> keyWords = new SparseArray<Object>();
	


	public int getScrapeId() {
		return scrapeId;
	}

	public void putKeyWord(int input, String keyWord){
		keyWords.put(input, keyWord);
	}

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeInt(scrapeId);
		dest.writeSparseArray(keyWords);
		
	}
	
	public static final Parcelable.Creator<BeautySource> CREATOR = new Creator<BeautySource>() {

		@SuppressWarnings("unchecked")
		@Override
		public BeautySource createFromParcel(Parcel source) {
			BeautySource result = new BeautySource(source.readInt());
			result.keyWords = source.readSparseArray(Object.class.getClassLoader());

			return result;
		}

		@Override
		public BeautySource[] newArray(int size) {
			return new BeautySource[0];
		}

	};

	
	
}
